unit UFrmSenha;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, dxCore, dxButton, RxGIF, ExtCtrls;

type
  TFrmsenha = class(TForm)
    Image1: TImage;
    dxButton1: TdxButton;
    dxButton2: TdxButton;
    Edit1: TEdit;
    dxButton3: TdxButton;
    procedure FormShow(Sender: TObject);
    procedure dxButton1Click(Sender: TObject);
    procedure dxButton3Click(Sender: TObject);
    procedure dxButton2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Frmsenha: TFrmsenha;

implementation
uses ufrmprotec, ufrmcontador;
{$R *.DFM}

procedure TFrmsenha.FormShow(Sender: TObject);
begin
   Brush.Style := BsClear;
end;

procedure TFrmsenha.dxButton1Click(Sender: TObject);
var
   OldValue : LongBool;
begin
   if Edit1.Text = '123456' then
   begin
      fechar := true;
      SystemParametersInfo(97, Word(false), @OldValue, 0);
      frmprotec.close;
      Frmcontador.escondeiniciar(true);
      Frmcontador.ShowTaskBar(true);
      Frmcontador.EnableTaskBar(true);
      Frmcontador.OpcoesMenu(true);
      Edit1.Text := '';
      FrmSenha.Close;
   end;
end;

procedure TFrmsenha.dxButton3Click(Sender: TObject);
begin
   if Edit1.Text = '123456' then
   begin
      Frmprotec.Show;
      FrmContador.EscondeIniciar(false);
      Frmcontador.ShowTaskBar(false);
      Frmcontador.EnableTaskBar(false);
      Frmcontador.OpcoesMenu(false);
      Edit1.Text := '';
      FrmSenha.Close;
   end;
end;

procedure TFrmsenha.dxButton2Click(Sender: TObject);
begin
   close;
end;

end.
